<?php if (!defined('THINK_PATH')) exit();?><html>
<head>
  <meta charset="UTF-8">

   <link href="__PUBLIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet">
   <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/main_style.css">
   <script src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>
   <script src="__PUBLIC__/bootstrap/js/bootstrap.min.js"></script>


</head>
<body>
<div id="activity_query">
      <h1>活动奖惩查询</h1>
      <form role="form" class="form1" action="<?php echo U(GROUP_NAME . '/RandP/select');?>" method="post">
        <span>输入学生学号</span>
        <input type="text" class="form-control" id="input" 
         placeholder="请输入学号" name="num">
         <input type="submit" class="btn btn-default" value="查询" name="submitS"/>
         <div class="activity-table">
         <table class="table table-striped">
   <thead>
      <tr>
         <td>学号</td>
         <td>活动分数</td>
         <td>获分原因</td>
      </tr>
   </thead>
   <tbody>
      <?php if(is_array($reason)): foreach($reason as $key=>$v): ?><tr>
         <td><?php echo ($v["num"]); ?></td>
         <td><?php echo ($v["addGrade"]); echo ($v["subGrade"]); ?></td>
         <td><?php echo ($v["addReason"]); echo ($v["subReason"]); ?></td>
      </tr><?php endforeach; endif; ?>
   </tbody>
    </table> 
       </div>
       <?php  if($_SESSION['userid'] == 0){ echo "<span>反馈加分错误</span>
               <textarea type='text' class='form-control' id='text' style='height:100px'
               placeholder='请输入反馈' name='text'>
               </textarea>
               <input type='submit' class='btn btn-default' value='提交反馈' name='submitI'/>
            "; } ?>
       
      </form>
   </div>
</body>
</html>